<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    html, body {
      display: flex;
      flex-direction: column;
      background-color: var(--bg);
      color: var(--font);
      margin: 0;
      padding: 0;
    }
    main {
      display: flex;
      flex-direction: column;
      height: 100vh;
      justify-content: center;
      align-items: center;
    }
    main h1 {
      text-transform: uppercase;
      color: #404040;
    }
    nav {
      position: fixed;
    }
    input {
      display: none;
    }
    label {
      display: flex;
      flex-direction: column;
      position: fixed;
      top: 30px;
      left: 30px;
      width: 23px;
      height: 23px;
      z-index: 2;
      justify-content: space-around;
    }
    label span {
      display: block;
      width: 100%;
      height: 2px;
      background-color: var(--font);
      transform: rotate(0deg);
      transition: transform 100ms;
      transform-origin: 0 50%;
    }
    input:checked+label span:nth-child(1) {
      transform: rotate(45deg);
    }
    input:checked+label span:nth-child(2) {
      visibility: hidden;
    }
    input:checked+label span:nth-child(3) {
      transform: rotate(-45deg);
    }
    .wrapper {
      width: 220px;
      height: 100vh;
      padding-top: 100px;
      box-sizing: border-box;
      background-color: #404040;
      transform: translateX(-100%);
      transition: transform 100ms ease-in-out;
    }
    .scroller {
      height: 100%;
      overflow: auto;
    }
    .scroller::-webkit-scrollbar {
      /*滚动条整体样式*/
      width : 5px;  /*高宽分别对应横竖滚动条的尺寸*/
      height: 1px;
    }
    .scroller::-webkit-scrollbar-thumb {
      /*滚动条里面小方块*/
      border-radius   : 10px;
      background-color: rgba(255, 255, 255, 0.13);
    }
    input:checked~.wrapper {
      transform: translateX(0);
    }
    ul {
      padding: 0;
      margin: 0;
      list-style-type: none;
      user-select: none;
    }
    ul li {
      padding: 7px 20px;
      line-height: 45px;
      text-align: right;
      transition: transform 100ms ease calc(120ms + var(--i) * 50ms);
      transform: translateX(-100%);
      text-transform: uppercase;
    }
    ul li:hover {
      background-color: #424242;
    }
    input:checked~.wrapper ul li {
      transform: translateX(0);
    }
    :root {
      --bg: #1E1E1E;
      --font: #ffffff;
    }
  </style>
</head>
<body>
  <nav>
    <input type="checkbox" id="toggle" />
    <label for="toggle">
      <span></span>
      <span></span>
      <span></span>
    </label>
    <div class="wrapper">
      <div class="scroller">
        <ul>
          <li style="--i:1">Home</li>
          <li style="--i:2">Article</li>
          <li style="--i:3">Question</li>
          <li style="--i:4">Link</li>
          <li style="--i:5">About</li>
        </ul>
      </div>
    </div>
  </nav>
  <main>
    <h1>tap the toggle to show</h1>
  </main>
</body>
</html>